package com.baizhi.cmfz.service.impl;

import com.baizhi.cmfz.annotation.AddCacheAnnotation;
import com.baizhi.cmfz.dao.MenuDao;
import com.baizhi.cmfz.entity.Menu;
import com.baizhi.cmfz.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class MenuServiceImpl implements MenuService {
	@Autowired(required = false)
	private MenuDao menuDao;

	@Override
	@Transactional(readOnly = true)
	@AddCacheAnnotation
	public List<Menu> selectMenu() {
		return menuDao.selectMenu();
	}
}
